Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: rename file and clean up #8996

Merged
merged 4 commits into from
Jan 22, 2025
Merged

*: rename file and clean up #8996

merged 4 commits into from
Jan 22, 2025

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jan 14, 2025

What problem does this PR solve?

Issue Number: ref #5766

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.22%. Comparing base (b66703c) to head (193988e).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8996   +/-   ##
=======================================
  Coverage   76.22%   76.22%           
=======================================
  Files         465      466    +1     
  Lines       70682    70733   +51     
=======================================
+ Hits        53879    53919   +40     
  Misses      13445    13445           
- Partials     3358     3369   +11     
Flag Coverage Δ
unittests 76.22% <88.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Signed-off-by: Ryan Leung <[email protected]>
@rleungx rleungx changed the title *: rename file *: rename file and clean up Jan 14, 2025
@rleungx rleungx requested review from JmPotato and lhy1024 January 15, 2025 03:08
Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest LGTM

c.serviceMode = newMode
log.Info("[pd] service mode changed",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep one of the two logs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, but I don't want to expose the API mode. Any idea?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if newMode != pdpb.ServiceMode_PD_SVC_MODE {
log.Info("[pd] changing from non-microservice to microservice")
}else{
log.Info("[pd] changing from microservice to non-microservice")
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it similar to line 87 and line 91?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resetTSOClientLocked and setServiceMode may be called at different places?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -321,7 +321,7 @@ func svcRootPath(svcName string) string {
return path.Join(constant.MicroserviceRootPath, c, svcName)
}

// LegacyRootPath returns the root path of legacy pd service.
// LegacyRootPath returns the root path of legacy PD.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to replace legacy with non-microservice env?

Copy link
Member Author

@rleungx rleungx Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name uses "legacy", I just keep using it.

Signed-off-by: Ryan Leung <[email protected]>
@rleungx rleungx requested a review from lhy1024 January 20, 2025 03:50
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 22, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 22, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 22, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-22 02:18:13.215791251 +0000 UTC m=+233620.546710880: ☑️ agreed by lhy1024.
  • 2025-01-22 06:40:43.682318238 +0000 UTC m=+249371.013237688: ☑️ agreed by JmPotato.

Copy link
Contributor

ti-chi-bot bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, lhy1024, niubell

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jan 22, 2025
@ti-chi-bot ti-chi-bot bot merged commit 6cadbe7 into tikv:master Jan 22, 2025
25 checks passed
@rleungx rleungx deleted the rename4 branch January 22, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants